package com.xcity.pomelo.response;

import com.xcity.db.entity.Employee;
import com.xcity.game.employee.skill.EmployeeSkill;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class EmployeeLearnSkillResponse extends Response {

	private byte succ;
	private long id;
	private int removedSkill;
	private EmployeeSkill skill;
	
	public EmployeeLearnSkillResponse(int serial, Employee employee, EmployeeSkill removedSkill, EmployeeSkill newSkill) {
		super(serial);
		this.id = employee.getId();
		this.removedSkill = removedSkill != null ? removedSkill.getId() : 0;
		this.skill = newSkill;
		this.succ = (byte) (newSkill != null ? 1 : 0);
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public byte getSucc() {
		return succ;
	}

	public void setSucc(byte succ) {
		this.succ = succ;
	}

	public int getRemovedSkill() {
		return removedSkill;
	}

	public void setRemovedSkill(int removedSkill) {
		this.removedSkill = removedSkill;
	}

	public EmployeeSkill getSkill() {
		return skill;
	}

	public void setSkill(EmployeeSkill skill) {
		this.skill = skill;
	}

}
